package com.li.sssp.server;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.li.sssp.entity.Module;
import com.li.sssp.entity.ModuleMast;
import com.li.sssp.repository.ModuleRepository;

@Service
public class ModuleService {

	@Autowired
	private ModuleRepository moduleRepository;
	
	public List<Module> getAll(){
		return moduleRepository.findAll();
	}
	public List<Module> getModuleByModuleMast(ModuleMast moduleMast){
		
		return moduleRepository.findByModuleMast(moduleMast);
	}
}
